package com.bigcreate.service;

import com.bigcreate.entity.Books;
import com.bigcreate.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BookService {

    int addBook(Books book);

    int deleteBookById(int id);

    int updateBook(Books book);

    // 修改数量
    int updateBookNum(int id, int num, int type);

    Books queryBookById(int id);

    List<Books> queryAll();

    // 根据名字查询书籍
    List<Books> queryBookByName(String name);

    User getUser(String name);

}
